/**
 * @description pinia 持久化参数配置
 * @param {String} key 存储到持久化的 name
 * @param {Array} paths 需要持久化的 state ['xxx'] => 用于指定 state 中哪些数据需要被持久化(指定只有xxx持久化处理)
 * @return persist
 * */
const piniaPersistConfig = (key, paths = []) => {
  const persist = {
    key,
    storage: localStorage,
    paths,
  };
  return persist;
};

export default piniaPersistConfig;
